<script setup>
// spa
import { RouterLink, RouterView } from 'vue-router'
import HelloWorld from './components/HelloWorld.vue'
</script>

<template>
  <el-container class="outer-container">
    <el-header class="layout-header">
      <img alt="Vue logo" class="logo" src="@/assets/logo.svg" width="64" height="64" />
    </el-header>
    <el-container class="inner-container">
      <el-aside>
          <el-menu :router="true">
            <el-menu-item index="/">Home</el-menu-item>
            <el-menu-item index="/about">About</el-menu-item>
            <el-sub-menu index="1">
              <template #title>
                <span>练习册</span>
              </template>
              <el-menu-item index="/practise1">练习页面1</el-menu-item>
              <el-menu-item index="/practise2">练习页面2</el-menu-item>
              <el-menu-item index="/prac3">练习页面3</el-menu-item>
              <el-menu-item index="/prac4">练习页面4</el-menu-item>
              <el-menu-item index="/vue2f">vue2子组件练习</el-menu-item>
              <el-menu-item index="/vue3f">vue3子组件练习</el-menu-item>
              <el-menu-item index="/axios">axios练习</el-menu-item>
            </el-sub-menu>
          </el-menu>
          <!-- <div class="wrapper">
            <nav>
              <RouterLink to="/">Home</RouterLink>
              <RouterLink to="/about">About</RouterLink>
              <RouterLink to="/practise1">练习页面1</RouterLink>
              <RouterLink to="/practise2">练习页面2</RouterLink>
              <RouterLink to="/prac3">练习页面3</RouterLink>
              <RouterLink to="/prac4">练习页面4</RouterLink>
            </nav>
          </div> -->
      
      </el-aside>
      <el-main>
        <RouterView />
      </el-main>
    </el-container>
  </el-container>
</template>

<style scoped>
.el-aside{
  background-color: blanchedalmond;
}
.outer-container {
  border: 2px solid rebeccapurple;
  height: 100vh;
}
.layout-header {
  background-color: sandybrown;
}
.inner-container {
  border: 2px solid goldenrod;
}
/* header {
  line-height: 1.5;
  max-height: 100vh;
}

.logo {
  display: block;
  margin: 0 auto 2rem;
}

nav {
  width: 100%;
  font-size: 12px;
  text-align: center;
  margin-top: 2rem;
}

nav a.router-link-exact-active {
  color: var(--color-text);
}

nav a.router-link-exact-active:hover {
  background-color: transparent;
}

nav a {
  display: inline-block;
  padding: 0 1rem;
  border-left: 1px solid var(--color-border);
}

nav a:first-of-type {
  border: 0;
}

@media (min-width: 1024px) {
  header {
    display: flex;
    place-items: center;
    padding-right: calc(var(--section-gap) / 2);
  }

  .logo {
    margin: 0 2rem 0 0;
  }

  header .wrapper {
    display: flex;
    place-items: flex-start;
    flex-wrap: wrap;
  }

  nav {
    text-align: left;
    margin-left: -1rem;
    font-size: 1rem;

    padding: 1rem 0;
    margin-top: 1rem;
  }
} */
</style>
